package com.lipy.dubboproduct.service.impl;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.config.annotation.Service;
import com.lipy.dubbocommon.service.DemoService;
import org.springframework.stereotype.Component;

// (filter = {"ipWhite"} 指定使用 ipwhite 的filter
@Service(filter = {"ipWhite"})
@Component
public class DemoServiceImpl implements DemoService {
    @Override
    public String get() {
        System.out.println("DemoServiceImpl.get");
        return "get method "+ System.currentTimeMillis();
    }

    @Override
    public void process() {
        try {
            Thread.sleep(500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("DemoServiceImpl.process");
    }
}
